package club.jdiy.core.properties;

import club.jdiy.core.storage.StoreType;
import lombok.Data;

/**
 * JDiy 文件存储配置
 *
 * @author ziquee(子秋) QQ号:39886616 主页: http://www.jdiy.club
 * @version 20200731
 */
@Data
public class JDiyStoreProperties {
    private StoreType type = StoreType.file;
    private Kodo kodo = new Kodo();
    private Oss oss = new Oss();
    private Minio minio = new Minio();

    @Data
    public static class Kodo {
        private String accessKey = "";
        private String secretKey = "";
        private String bucket = "";
        private String domain = "";
        private Boolean delete = true;
        private KodoRegion region = KodoRegion.autoRegion;

        public enum KodoRegion {
            autoRegion,
            beimei, huabei, huadong, huanan,
            qvmHuabei, qvmHuadong, qvmRegion0, qvmRegion1,
            region0, region1, region2,
            regionAs0, regionNa0, xinjiapo;
        }
    }

    @Data
    public static class Oss {
        private String accessKey = "";
        private String secretKey = "";
        private String bucket = "";
        private String endpoint = "";
        private String domain = "";
    }

    @Data
    public static class Minio {
        private String accessKey = "Not configured yet";
        private String secretKey = "Not configured yet";
        private String bucket = "Not configured yet";//e.g: res
        private String endpoint = "Not configured yet";//e.g: http://xxx.com:9000
        private String domain = "Not configured yet";//访问域名
    }
}
